Due to the developing and designing of the image processing program, lots of memories are needed for operation in the image processing. Therefore, a good memory managing method can not only increase the performance and the stability of the system, but also decrease the requirement of memories.
Besides, in the consideration of the cost, it is very important to use memories efficiently. Particularly in the embedded system, memories are limited. When processing the image, the requirement of memories is necessary. Owing to the increasing of the image size, the requirement of memories will be increased accordingly. Therefore, a good memory managing method can raise the stability of the software operation and save the power. Considering the whole power budget, the system stability, the appropriate power distribution, etc., the cost will be reduced with the miniaturization of memories.
Take the camera program for the conventional Smartphone for example. Please refer to FIG. 1, which is a flow chart of a conventional memory managing method. As shown in step 1, the method provides a memory of 16 bits (2 bytes) to each pixel at the initiation. Then, a high-color image of 16 bits is captured by a camera and shown in a monitor. It means that when an image of W×H pixels is temporally stored, a memory of W×H×2 bytes is needed (step 2). During the image access, the 16-bit high-color image needs to be transformed into a 24-bit true-color image which needs a memory of W×H×3 bytes. Moreover, the image is continuous. Therefore, when the 16-bit high-color image are transformed into the 24-bit true-color image, an additional memory of W×H×3 bytes needs to be provided. In other words, the system totally needs a memory of W×H×5 bytes for transforming (step 3). Hence, when the image size is too large, the lack of memories will occur easily. The solutions of the conventional techniques for such problem are to either limit the image size to be input or add more memories.
In order to overcome the drawbacks in the prior art, an improved image processing device and the method thereof are provided. The particular design in the present invention not only solves the problems described above, but also is easy to be implemented. Thus, the invention has the utility for the industry.